<template>
	<view>
		<view class="uni-margin-wrap">
			<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
				:duration="duration">
				<swiper-item>
					<view class="swiper-item uni-bg-red"><image src="../../static/ad/banner1.jpg" mode=""></image></view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item uni-bg-green"><image src="../../static/ad/banner2.jpg" mode=""></image></view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item uni-bg-blue"><image src="../../static/ad/banner3.jpg" mode=""></image></view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500
			}
		},
		methods: {
			changeIndicatorDots(e) {
				this.indicatorDots = !this.indicatorDots
			},
			changeAutoplay(e) {
				this.autoplay = !this.autoplay
			},
			intervalChange(e) {
				this.interval = e.detail.value
			},
			durationChange(e) {
				this.duration = e.detail.value
			}
		}
	}
</script>

<style scoped>
	.uni-margin-wrap {
		width: 690rpx;
		width: 100%;
		;
	}

	.swiper {
		height: 300rpx;
	}

	.swiper-item {
		display: block;
		height: 300rpx;
		line-height: 300rpx;
		text-align: center;
		width: 100vw;
	}
.swiper-item > image {
		width: 100%;
}
	.uni-bg-red image{
		background-color: pink;
	}

	.uni-bg-green {
		background-color: yellowgreen;
	}

	.uni-bg-blue {
		background-color: #66ccff;
	}
</style>
